//
//  MyOrderCell.m
//  KuWeiPark
//
//  Created by Kevin Su on 15/4/29.
//  Copyright (c) 2015年 Clief. All rights reserved.
//

#import "MyOrderCell.h"
#import "AppMacro.h"

@implementation MyOrderCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)initDataWithBookOrderModel:(BookParkingPortOrderModel *)bookOrderModel{
    
    self.nameLabel.text = bookOrderModel.parkingName;
    self.orderDateLabel.text = bookOrderModel.createTime;
    
    switch ([bookOrderModel.orderStatus intValue]) {
        case BOOKING_PAY_WAIT:
        {
            //未支付
            self.orderStatusLabel.text = @"未支付";
            self.orderStatusLabel.textColor = MAIN_RED_COLOR;
            break;
        }
        case BOOKING_CANCEL:{
            
            //已取消
            self.orderStatusLabel.text = @"已取消";
            self.orderStatusLabel.textColor = [UIColor lightGrayColor];
            break;
        }
        case BOOKING_FAILURE:{
            
            break;
        }
        case BOOKING_SUCCESS:{
            
            //已支付
            self.orderStatusLabel.text = @"已支付";
            self.orderStatusLabel.textColor = MAIN_GREEN_COLOR;
            break;
        }
        case BOOKING_TIMEOUT:{
            
            break;
        }
        default:
            break;
    }
    
}

@end
